package com.learner.pojo.blog;

import lombok.Data;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * @author ice2020x
 * @Date: 2023/3/7
 * @Description: 博客评论
 **/
@Data
@Entity
@Table(name = "blog_comment")
@GenericGenerator(name = "jpa-uuid", strategy = "uuid")
public class BlogComment implements Serializable {

    private static final long serialVersionUID = -1L;
    @Id
    @GeneratedValue(generator = "jpa-uuid")
    private String id;

    private String content;


    /**
     * 父评论ID 没有设零
     */
    private String parentId;

    private String blogId;

    /**
     * 评论的用户ID
     */
    private String userId;


    private String nickname;
    /**
     * 置顶等级
     */
    private Integer level;
    /**
     * 是否为叶子节点
     */
    private Integer leaf;

    @CreationTimestamp
    private Date createTime;

    /**
     * 逻辑删除
     */
    private Integer status;

    private String avatar;

    private String score;
}
